<meta charset="UTF-8">

<?php

/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
 session_start();
 include("top.php");
?>

<table width="766" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="209" valign="top" bgcolor="#F5F5F5"><?php
 include("left.php");
?></td>
    <td width="581" align="center" valign="top" bgcolor="#FFFFFF"><table width="557" height="6" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td></td>
      </tr>
    </table>      
      <table width="530" height="20" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td height="25" align="center" bgcolor="#B0E0E6">&nbsp;&nbsp;图书信息</td>
        </tr>
      </table>
        <table width="530" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td bgcolor="#666666">
              <table width="530" border="0" align="center" cellpadding="0" cellspacing="1">
                <?php
		     $sql= exectue_sql_statement($conn, "select Book.book_id, book_name, book_introduction, book_catalog, unit_price, book_img, book_amount from Book, Store where Book.book_id=Store.book_id and Book.book_id=".$_GET['book_id']); 
                     $info=sqlsrv_fetch_array($sql);
		   ?>
                <tr>
                  <td width="89" height="80" rowspan="5" align="center" valign="middle" bgcolor="#FFFFFF"><div align="center">
                      <?php
			    if($info['book_img']==""){
				  echo "暂无图片";
				}
				else
				{
			  ?>
                      <a href="<?php echo $info['book_img'];?>" target="_blank"><img src="<?php echo $info['book_img'];?>" alt="查看大图" width="80" height="80" border="0"></a>
                      <?php
			    }
			  ?>
                  </div></td>
                  <td width="92" height="20" align="left" bgcolor="#FFFFFF"><div align="center">图书名称：</div></td>
                  <td width="134" bgcolor="#FFFFFF"><div align="left">&nbsp;<?php echo $info['book_name'];?></div></td>
                </tr>
                <tr>
                  <td height="20" align="left" bgcolor="#FFFFFF"><div align="center">售价：</div></td>
                  <td width="134" bgcolor="#FFFFFF"><div align="left">&nbsp;<?php echo $info['unit_price'];?></div></td>
                </tr>
                <tr>
                  <td width="100" bgcolor="#FFFFFF"><div align="center">数量：</div></td>
                  <td width="129" bgcolor="#FFFFFF"><div align="left">&nbsp;<?php echo $info['book_amount'];?></div></td>
                </tr>
                <tr>
                  <td width="89" height="69" bgcolor="#FFFFFF"><div align="center">图书简介：</div></td>
                  <td height="69" bgcolor="#FFFFFF" valign="top"><div align="left"><br><?php echo $info['book_introduction'];?></div></td>
                </tr>
                <tr>
                  <td width="89" height="69" bgcolor="#FFFFFF"><div align="center">图书目录：</div></td>
                  <td height="69" bgcolor="#FFFFFF" valign="top"><div align="left"><br>
                      <?php
                        echo $info['book_catalog'];
                      ?>
                  </div></td>
                </tr>
            </table></td>
          </tr>
        </table>
        <table width="530" height="20" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
              <td><div align="center"><a href="addtocart.php?book_id=<?php echo $info['book_id'];?>"><input type="button" value="放入购物车"></a>&nbsp;&nbsp;</div></td>
              <td><div align="center"><input type="button" value="返回" onclick="javascript:history.go(-1);">&nbsp;&nbsp;</div></td>
          </tr>
        </table>
        <?php
	   if(@$_SESSION['username']!="")
	   {
	  
	  ?>
    <?php
	   }
	  
	  ?></td></tr>
</table>
<?php
 include("bottom.php");
?>